package com.hh.legalFactory.mapper;

import com.hh.legalFactory.bean.Factory;
import com.hh.legalFactory.bean.QueryPlantByLegalVo;
import com.hh.legalFactory.vo.FormInlineVo;
import com.hh.legalFactory.vo.UpdateStatusVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface FactoryMapper {
    List<Factory> selectAllByPage(FormInlineVo formInlineVo);

    int updateStatusById(UpdateStatusVo updateStatusVo);

    int insert(Factory record);

    int judgeFactoryCode(String factoryCode);

    Factory selectByPrimaryKey(Integer id);

    int updateFactoryByPrimaryKey(Factory record);


    int judgeUpdateFactoryName(Integer id, String factoryCode);

    int judgeLegalPersonStatus(String legalPersonCode);

    List<QueryPlantByLegalVo> getPlanByLegalCode(String legalPersonCode);

    Integer getPlanByLegalCodeAndPlantCode(String legalPersonCode, String legalPlantCode);

    Integer getPlantIdByPlantCode(String legalPlantCode);
}